package com.yilin.platform.base_core.commons.base;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.yilin.platform.base_core.commons.annotation.Explain;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

@MappedSuperclass
public class BaseDeletedEntity extends BaseOrganizeEntity {
    @Explain("逻辑删除")
    @TableLogic
    @Column(name = "is_deleted", columnDefinition = "INT default 0")
    private Integer isDeleted;
    @Explain("乐观锁")
    @Version()
    @Column(name = "version", columnDefinition = "INT default 0")
    private Integer version = 0;

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
